package com.donquijote.spring6.family;

/**
 * @author 421527548@qq.com
 * @version V1.0
 * @title
 * @description
 * @date 2022-11-16 17:47
 */
public class Wife {
    private String name;
    private Husband husband;

    public Wife() {
        System.err.println("wife的无参构造");
    }

    public void setName(String name) {
        this.name = name;
    }


    public String getName() {
        return name;
    }

    public void setHusband(Husband husband) {
        this.husband = husband;
        System.err.println("setHusband赋值");
    }

    @Override
    public String toString() {
        return "Wife{" +
                "name='" + name + '\'' +
                ", husband=" + husband.getName() +
                '}';
    }

}
